# Lists a customer's payment methods

<span class="api-endpoint">GET {{<a href="#urlbases">baseURL</a>}}/pay-api/v1/customers/{{customerId}}/payment-methods</span>
This endpoint lists a customer's payment methods.

Endpoint: GET /pay-api/v1/customers/{customerId}/payment-methods
Version: V1
Security: Bearer

## Path parameters:

  - `customerId` (string, required)
    Specifies a customer's identifier.

## Query parameters:

  - `search` (string)
    Specifies the search string.

This performs a case insensitive, matching, or partially matching search.

Fields does not have to be specified.
If the results are to be sorted, the field `orderby` to specify the sort field.

  - `page` (integer)
    Specifies the page number of the returned search results.

A page is considered each set of the `pageSize` value.

The maximum page value is the `pageSize` divided by the `total` count rounded up.
The count is zero-based.
For example, if `pageSize` is 50 and the `total` is 130, there are three pages.
The maximum `page` value is 2.

Values above the maximum page value will complete successfully but not return any items.

Example: 0

  - `pageSize` (integer)
    Specifies the number of items for each page of the returned search results.

A page is considered each set of the `pageSize` value.

The maximum page value is the `pageSize` divided by the `total` count rounded up.
The count is zero-based.
For example, if `pageSize` is 50 and the `total` is 130, there are three pages.
The maximum `page` value is 2.

Example: 50

  - `orderBy` (string)
    Specifies the field the results get ordered by.

The sort order is specified by the `asc` value.

Example: contactName

  - `asc` (boolean)
    Specifies the sort order is ascending.

The sort field is specified by the `orderBy` value.

If `true`, the sort order is ascending.<br>
If `false`, the sort order is descending.

Example: true

  - `dateFrom` (string)
    Specifies returning items on or after this date (in an ISO 8601 date-time UTC format).

If `dateFrom` only is specified, the search returns all available items from the `dateFrom` value to the present.
The fields `dateFrom` and `dateTo` may be used together to create an exclusive range.
We recommend creating an exclusive range to avoid a potentially excessive number of returns.

  - `dateTo` (string)
    Specifies returning items on or to this date (in an ISO 8601 date-time UTC format).

If `dateTo` only is specified, the search returns all available items up to the `dateTo` value.
The fields `dateFrom` and `dateTo` may be used together to create an exclusive range.
We recommend creating an exclusive range to avoid a potentially excessive number of returns.

## Response 200 fields (application/json):

  - `items` (array)

  - `items.id` (string)
    Indicates the paymentMethodId (payment method identifier).

Example: 09af9936-08ec-4235-8386-b8d341cc88e7
    Example: 09af9936-08ec-4235-8386-b8d341cc88e7

  - `items.name` (string)
    Specifies the payment method name.

This is a free-formed name that is convenient for the merchant to recognize. 

Example: Peppared Street Cafe's Preferred Payment
    Example: Peppared Street Cafe's Preferred Payment

  - `items.panMask` (string)
    Indicates the masked PAN (primary account number).
This is a partially obscured representation of a card's PAN.
This value can be  safely displayed to clients without revealing the actual or full account number,
Examples:
4111********1234
************1234
****1234
    Example: 4111********1234

  - `items.isDefault` (boolean)
    Indicates this payment method is the default.
If `true`, this payment method is the default.
If `false`, this payment method is not the default.
Example: true
    Example: true

  - `items.typeId` (integer)
    Indicates the type identifiers.
Possible values:
| Id | Payment Type |
|  --- | --- |
| 1 | Card |
| 2 | ElectronicCheck |
| 3 | Cash |

Example: 2
    Example: 2

  - `items.typeName` (string)
    Indicates the type name.
Possible values:
| Payment Type |
|  --- |
| Card |
| ElectronicCheck |
| Cash |

Example: ElectronicCheck
    Example: ElectronicCheck

  - `items.expirationMonth` (integer)
    Indicates the expiration month of the card.

Example: 7
    Example: 7

  - `items.expirationYear` (integer)
    Indicates the expiration year of the card.

Example: 2032
    Example: 2032

  - `items.createdOn` (string)
    Indicates the date the customer was created (in an ISO 8601 date-time UTC format).

Examples: 2025-01-27T12:05:54.322587Z
    Example: 2025-01-27T12:05:54.322587Z

  - `items.accountNumber` (string)
    Specifies the account number.

Example: 123456789
    Example: 123456789

  - `items.routingNumber` (string)
    Specifies the routing number.

Example: 123123123
    Example: 123123123

  - `items.accountType` (integer)
    Identifies the account type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Checking | Checking |
| 2 | Savings | Savings |

Example: 1
    Example: 1

  - `items.accountHolderType` (integer)
    Identifies the account holder type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Business | Business |
| 2 | Personal | Personal |

Example: 1
    Example: 1

  - `items.taxId` (string)
    Specifies the customer's tax identifier (TIN).

Example: 98-7654321
    Example: 98-7654321

  - `items.cardTokenType` (integer)
    Identifies the card token type.
Possible values:
| Id | Type | Description |
|  --- | --- | --- |
| 1 | Local | Regular |
| 2 | Network | Network |

Example: 2
    Example: 2

  - `total` (integer)
    Indicates the total number of payment methods found.

Example: 7
    Example: 7

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 404 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

## Response 500 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

